/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const caiwuRouter = {
  path: '/caiwu',
  component: Layout,
  redirect: '/caiwu/weihu/chaxun',
  name: 'Caiwu',
  meta: {
    title: '财务子系统',
    icon: 'money',
    roles: ['财务']
  },
  children: [
    {
      path: 'weihu',
      component: () => import('@/views/caiwu/weihu/index'), // Parent router-view
      name: 'Weihu',
      meta: { title: '系统维护' },
      redirect: '/caiwu/weihu/chaxun/chaxun',
      children: [
        {
          path: 'chaxun',
          component: () => import('@/views/caiwu/weihu/chaxun/chaxun'),
          name: 'Chaxun',
          meta: { title: '查询车辆' }
        },
        {
          path: 'piaohao',
          component: () => import('@/views/caiwu/weihu/piaohao/piaohao'),
          name: 'Piaohao',
          meta: { title: '修改票号' }
        },
        {
          path: 'zhanghao',
          component: () => import('@/views/caiwu/weihu/zhanghao/zhanghao'),
          name: 'Zhanghao',
          meta: { title: '修改账号' }
        },
        {
          path: 'xinxi',
          component: () => import('@/views/caiwu/weihu/xinxi/xinxi'),
          name: 'Xinxi',
          meta: { title: '车辆信息' }
        }
      ]
    },
    {
      path: 'jiesuan',
      component: () => import('@/views/caiwu/jiesuan/index'), // Parent router-view
      name: 'Jiesuan',
      meta: { title: '自然月结算' },
      redirect: '/caiwu/jiesuan/dongzhan/dongzhan',
      children: [
        {
          path: 'dongzhan',
          component: () => import('@/views/caiwu/jiesuan/dongzhan/dongzhan'),
          name: 'Dongzhan',
          meta: { title: '东站自然月' }
        },
        {
          path: 'sangongsi',
          component: () => import('@/views/caiwu/jiesuan/sangongsi/sangongsi'),
          name: 'Sangongsi',
          meta: { title: '三公司自然月' }
        }
      ]
    },
    {
      path: 'dayin',
      component: () => import('@/views/caiwu/dayin/index'), // Parent router-view
      name: 'Dayin',
      meta: { title: '系统报表打印' },
      redirect: '/caiwu/jiesuan/gsjiesuan/gsjiesuan',
      children: [
        {
          path: 'gsjiesuan',
          component: () => import('@/views/caiwu/dayin/gsjiesuan/gsjiesuan'),
          name: 'Gsjiesuan',
          meta: { title: '公司结算明细' }
        },
        {
          path: 'sgsjiesuan',
          component: () => import('@/views/caiwu/dayin/sgsjiesuan/sgsjiesuan'),
          name: 'Sgsjiesuan',
          meta: { title: '三公司结算明细' }
        },
        {
          path: 'dzxianlu',
          component: () => import('@/views/caiwu/dayin/dzxianlu/dzxianlu'),
          name: 'Dzxianlu',
          meta: { title: '东站线路结算' }
        },
        {
          path: 'gsjiesuanrb',
          component: () => import('@/views/caiwu/dayin/gsjiesuanrb/gsjiesuanrb'),
          name: 'Gsjiesuanrb',
          meta: { title: '公司结算日报' }
        },
        {
          path: 'yychaxun',
          component: () => import('@/views/caiwu/dayin/yychaxun/yychaxun'),
          name: 'Yychaxun',
          meta: { title: '运营情况查询' }
        },
        {
          path: 'spchaxun',
          component: () => import('@/views/caiwu/dayin/spchaxun/spchaxun'),
          name: 'Spchaxun',
          meta: { title: '售票情况查询' }
        },
        {
          path: 'cheliangcz',
          component: () => import('@/views/caiwu/dayin/cheliangcz/cheliangcz'),
          name: 'Cheliangcz',
          meta: { title: '查询车辆出站' }
        }
      ]
    }
  ]
}

export default caiwuRouter
